package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DrivingcartimeMapper;
import com.ruoyi.system.domain.Drivingcartime;
import com.ruoyi.system.service.IDrivingcartimeService;
import com.ruoyi.common.support.Convert;

/**
 * 代驾服务时段 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
@Service
public class DrivingcartimeServiceImpl implements IDrivingcartimeService 
{
	@Autowired
	private DrivingcartimeMapper drivingcartimeMapper;

	/**
     * 查询代驾服务时段信息
     * 
     * @param drivingcartimeId 代驾服务时段ID
     * @return 代驾服务时段信息
     */
    @Override
	public Drivingcartime selectDrivingcartimeById(Integer drivingcartimeId)
	{
	    return drivingcartimeMapper.selectDrivingcartimeById(drivingcartimeId);
	}
	
	/**
     * 查询代驾服务时段列表
     * 
     * @param drivingcartime 代驾服务时段信息
     * @return 代驾服务时段集合
     */
	@Override
	public List<Drivingcartime> selectDrivingcartimeList(Drivingcartime drivingcartime)
	{
	    return drivingcartimeMapper.selectDrivingcartimeList(drivingcartime);
	}
	
    /**
     * 新增代驾服务时段
     * 
     * @param drivingcartime 代驾服务时段信息
     * @return 结果
     */
	@Override
	public int insertDrivingcartime(Drivingcartime drivingcartime)
	{
	    return drivingcartimeMapper.insertDrivingcartime(drivingcartime);
	}
	
	/**
     * 修改代驾服务时段
     * 
     * @param drivingcartime 代驾服务时段信息
     * @return 结果
     */
	@Override
	public int updateDrivingcartime(Drivingcartime drivingcartime)
	{
	    return drivingcartimeMapper.updateDrivingcartime(drivingcartime);
	}

	/**
     * 删除代驾服务时段对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDrivingcartimeByIds(String ids)
	{
		return drivingcartimeMapper.deleteDrivingcartimeByIds(Convert.toStrArray(ids));
	}
	
}
